<div class="box-body">
    <form class="layui-form" action="{:url('save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">风险等级</label>
            <div class="layui-input-block">
                <select name="risk_num" lay-search>
                    <option value="">请选择</option>
                    {foreach $risk_num as $r}
                    <option {if isset($black) && $black.risk_num == $r}selected{/if} value="{$r}">{$r}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">平台</label>
            <div class="layui-input-block">
                <select name="platform_name" lay-search>
                    <option value="">请选择</option>
                    {foreach $platform as $p}
                    <option {if isset($black) && $black.platform_name == $p.name}selected{/if} value="{$p.name}">{$p.name}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">国家</label>
            <div class="layui-input-block">
                <select name="buyer_country_code" lay-search>
                    <option value="">请选择</option>
                    {foreach $country as $c}
                    <option {if isset($black) && $black.buyer_country_code == $c.code_two}selected{/if} value="{$c.code_two}">{$c.name_ch}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">收件人</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.consignee}"{/if} name="consignee" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家名</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.buyer_first_name}"{/if} name="buyer_first_name" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家姓</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.buyer_last_name}"{/if} name="buyer_last_name" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮编</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.buyer_post_code}"{/if} name="buyer_post_code" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家电话</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.buyer_phone}"{/if} name="buyer_phone" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家手机</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" name="buyer_mobile" {if isset($black)}value="{$black.buyer_mobile}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家账号</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" name="buyer_account" {if isset($black)}value="{$black.buyer_account}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家邮箱</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" name="buyer_email" {if isset($black)}value="{$black.buyer_email}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家省/州</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" name="buyer_province" {if isset($black)}value="{$black.buyer_province}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家城市</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" name="buyer_city" {if isset($black)}value="{$black.buyer_city}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家地址</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" name="buyer_address_1" {if isset($black)}value="{$black.buyer_address_1}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">买家订单号</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.order_no}"{/if} placeholder="多个使用逗号分开" name="order_no" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">进入黑名单原因</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.reason}"{/if} name="reason" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" {if isset($black)}value="{$black.remark}"{/if} name="remark" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" {if !isset($black) || (isset($black) && $black->getData('status')==1)}checked{/if} value="1" lay-skin="switch">
            </div>
        </div>
        {if isset($black)}
        <input type="hidden" name="black_id" value="{$black.black_id}">
        {/if}
    </form>
</div>